% MT fwd & inverse computaton - keller & kaufman 
% latest date 04.01.2002
% inverse problems ----(???)
% fwd nlayer bug fixed 02.1.2002

% t = period (input - HZ)
% rho = layer resisitivity ohm-m
% h = layer thickness (M)
% j9XY;
% check s imp 26.2.5
mu = 4*pi*10^-7;
d1 = sqrt(1/mu);
h   = [1000 2000 3000 4000];
rho = [250 25 100 10 25];
frq = 10.^[-4:.1:4];
t = 1./frq;
[z]=s_imp(rho,h,t);
s = z.*sqrt(0.2*t*sqrt(-1));
rhoa=real(s).^2;
rhoi=imag(s).^2;
rh = z.*conj(z).*t.*0.2;
ph = atan(imag(z)./real(z)).*(180/pi);
loglog(t,rhoa,'r.',t,rhoi,'b.',t,rh,'r.');


% there is a problem with the rh values -> a constant fac times the correct
% valeue!

